// import './assets/main.css'
import './index.css' // 
import {
    createApp
} from 'vue'
import App from './App.vue'
// 引入pinia
import { createPinia } from 'pinia'
const pinia = createPinia()
// 引入公共css
import './assets/css/common.css'
import './assets/css/dark.css'

// 引入路由
import router, {
    setupRouter
} from './router'
const app = createApp(App)

// 引入世纪桥配置
import sjq from './sjq'

// 引入element-plus
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import zhCn from 'element-plus/es/locale/lang/zh-cn'
import 'element-plus/theme-chalk/display.css'
import 'element-plus/theme-chalk/src/dark/css-vars.scss';


import * as ElementPlusIconsVue from '@element-plus/icons-vue'
// 图标
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}

// 引入animate.css动画库
import 'animate.css';

// 引入世纪桥大屏组件库，主要为了图标库
import sjqScreen from 'sjq-screen';
import 'sjq-screen/sjq-screen.css';

// 引入自定义指令
// import directive from './directive';

import * as THREE from "three";

app.config.globalProperties.$THREE = THREE;  //挂载到原型

app.use(ElementPlus, {
    locale: zhCn,
})
app.use(sjq)
app.use(sjqScreen);
app.use(pinia)

// app.use(directive)
// app.use(router)
setupRouter(app)
router.isReady().then(() => app.mount('#app'))
